Optimizing a FIFO, scalable spin lock using consistent memory

نویسنده

  • Injong Rhee
چکیده

This paper presents a FIFO queue-based spin lock that (1) uses only one atomic swap operation; (2) is scalable as it requires a constant amount of communication; (3) runs without a coherent cache support; and (4) provides a timing guarantee required for real-time applications. The algorithm is optimal in terms of the number of atomic operations required to solve a scalable mutual exclusion problem in NUMA architectures, improving on Craig's spin lock 5] that uses four atomic swap operations. It minimizes the number of atomic operations by replacing them with non-atomic read and write operations. This optimization can beneet greatly from modern multiprocessors where non-atomic memory operations are much more optimized than atomic operations. The algorithm runs correctly in various weakly consistent memories, providing a potentially signiicant speed-up over the algorithms with more atomic operations.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fast and Scalable, Lock-Free k-FIFO Queues

We introduce fast and scalable algorithms that implement boundedand unbounded-size lock-free k-FIFO queues on parallel, shared memory hardware. Logically, a k-FIFO queue can be understood as queue where elements may be dequeued out-of-order up to k 1, or as pool where the oldest element is dequeued within at most k dequeue operations. The presented algorithms enable up to k enqueue and k dequeu...

متن کامل

Lock cohorting: A general technique for designing NUMA locks Citation

Multicore machines are quickly shifting to NUMA and CC-NUMA architectures, making scalable NUMA-aware locking algorithms, ones that take into account the machines’ non-uniform memory and caching hierarchy, ever more important. This paper presents lock cohorting, a general new technique for designing NUMA-aware locks that is as simple as it is powerful. Lock cohorting allows one to transform any...

متن کامل

Cache-Aware Lock-Free Queues for Multiple Producers/Consumers and Weak Memory Consistency

A lock-free FIFO queue data structure is presented in this paper. The algorithm supports multiple producers and multiple consumers and weak memory models. It has been designed to be cache-aware and work directly on weak memory models. It utilizes the cache behavior in concert with lazy updates of shared data, and a dynamic lock-free memory management scheme to decrease unnecessary synchronizati...

متن کامل

RH Lock: A Scalable Hierarchical Spin Lock

Scalable architectures with non-uniform memory access time (NUMAs) have gained increased popularity in recent years. The increased scalability have increased the demand for scalable lock implementations, such as the queue-based locks of Mellor-Crummey and Scott (MCS lock), and of Craig, Landin and Hagersten (CLH lock). This paper demonstrates that the first-come first-served nature of queue-bas...

متن کامل

calable Synchronization on

Busy-wait techniques are heavily used for mutual exclusion and barrier synchronization in shared-memory parallel programs Unfortunately, typical implementations of busy-waiting tend to produce large amounts of memory and interconnect contention, introducing performance bottlenecks that become markedly more pronounced as applications scale. We argue that this problem is not fundamental, and that...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996